package com.kawa.kemanage.mapper;

import com.kawa.kemanage.entity.dto.ReadMessageDTO;
import com.kawa.kemanage.entity.SystemMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: KAIyo
 * @Date: 2025/6/20 10:12
 * @Version: v1.0.0
 * @Description: TODO
 **/
@Mapper
public interface SystemMessageMapper {
    Integer getUnreadCount(Integer userId);

    List<SystemMessage> getSystemMessages(Integer userId);

    // 适配单个已读和多个已读
    boolean readSystemMessage(ReadMessageDTO readMessageDTO);

    Integer getUnreadCountByType(@Param("type") String type,@Param("userId") Integer userId);
}
